<?php


/**
 * Skeleton subclass for performing query and update operations on the 'menu' table.
 *
 * 
 *
 * You should add additional methods to this class to meet the
 * application requirements.  This class will only be generated as
 * long as it does not already exist in the output directory.
 *
 * @package    propel.generator.database
 */
class MenuPeer extends BaseMenuPeer {
    
    public static function getMenuByParentID($id)
    {
        $c = new Criteria();
        $c->add(self::PARENTID,$id);
        return self::doSelectOne($c);
    }
    
    public static function getModules()
    {
        $c = new Criteria();
        $c->add(self::RANK,core::$user->getUser()->getRank(), criteria::GREATER_EQUAL);
        return parent::getModules($c);
    }

} // MenuPeer
